1. Field of the Invention
The present invention relates to a cylindrical container inner surface tester which determines the existence of defects on the inner surface of a cylindrical container, and to, for example, a cylindrical container inner surface tester capable of detecting defects such as spots, concavity, scratches, etc. on the inner surface of a cylindrical container by transporting the cylindrical container such as an aluminum can of beer, paper cup, etc. to a checking position in a checking process, capturing the inner surface by a TV camera, storing the captured image in an image processing device, and properly processing the image.
2. Description of the Related Art
A conventional cylindrical container inner surface tester captures the inner surface of a test cylindrical container using a TV camera from the central axis of the container with the inner surface of the cylindrical container illuminated by a stroboscope light source from above the container, stores the captured static image in an image processing device, checks the existence of defects such as spots, concavity, scratches, etc. on the surface of the test cylindrical container by processing the stored static image, and determines the acceptability of the test cylindrical container. The tester is disclosed by the Patent Official Gazette Tokukaihei 5-72141 (which corresponds to U.S. Pat. No. 5,233,199) related to the application of the Applicant of the present invention.
FIGS. 1A through 1C show the outline of the conventional cylindrical container inner surface tester. The inner surface tester comprises a TV camera 1, an image processing device 2, and a stroboscope illumination light. It captures the inner surface of a cylindrical container 3 (transported by a belt conveyor to a predetermined checking position) by the TV camera 1 mounted along the central axis of the cylindrical container 3 with the cylindrical container 3 having a bottom portion as shown in FIG. 1A illuminated from above the container as shown in FIG. 1A, processes the captured static image in the image processing device 2, checks for the existence of defects such as spots, concavity, scratches, etc., and determines the acceptability of the cylindrical container 3.
FIG. 1B is a plan view of the cylindrical container 3 (can) captured by the TV camera 1. The boundary 3c between the bottom 3a and the side 3b, and the aperture of the cylindrical container 3 are illuminated and captured by the image processing device 2 as ring-shaped highlighted portions 101 and 102 in the captured image, and observed as concentric belts. FIG. 1C shows a wave form of a video signal generated while a scanning point is shifted along a raster scanning line Q-Q1 of the TV camera 1. The signal becomes a gray image signal changing according to the pattern of the highlighted portions 101 and 102.
If spots, scratches, etc. are detected on the surface of the cylindrical container 3, they absorb the illuminating light or are highlighted, thereby indicating a change in the pattern of the image. If the cylindrical container 3 is concave, the highlighted portions 101 and 102 cannot show perfect circularity. The image processing device 2 binarizes the gray image signal according to a predetermined threshold (for example, 1 if the signal indicates a level equal to or higher than the threshold, and 0 if it indicates a level lower than the threshold), differentiates the video signal and emphasizes the change in the signal to easily detect the increment or decrement in the patterns of the highlighted portions 101 and 102. Then, the image processing device 2 determines the accessibility of the cylindrical container 3 based on the above described processes. If the number and area of the defective portions exceed an allowable value, the determination result is output such that it indicates the cylindrical container as defective. Obviously, the cylindrical container determined as defective in the automatic check process is removed from the belt conveyor.
Additionally, the inner surface tester sets a plurality of test areas (windows) for a test cylindrical container, first detects the position of the cylindrical container when the container is transported to a predetermined position, corrects the difference in position through the image processing device, and generate windows at predetermined areas, thereby successfully checking defects.
The position of the test cylindrical container is checked as follows. That is, regarding the highlighted portions 101 and 102, an image signal is binarized, and then coordinates are obtained at the first rise point and the last fall point of the image signal appearing in the window along each raster scanning line. Based on the average value of the middle point of the obtained coordinates, the position of the test cylindrical container on the coordinate axis (X axis) in the scanning direction is specified. Then, the scanning direction is switched to the direction vertical to the previous scanning direction, and the position of the test cylindrical container is specified on the coordinate axis (Y axis) in the scanning direction according to the above described method. As a result, the position of the cylindrical container can be specified on a two-dimensional display screen.
Concerning the method of binarizing an image signal for use in detecting the position of a container, a difference binarization method is adopted because the gray level of an image is not so clearly displayed as to follow the fixed binarization method. For example, the binarization is based on the calculation result of the following equation (1). EQU .vertline.P(i,j)-P(i+.alpha.,j).vertline.&gt;Thd.fwdarw.1 (1)
where P (i,j) indicates a target picture element, P (i+.alpha.,j) indicates a background picture element .alpha. picture elements apart from the target picture element in the scanning direction, and Thd indicates a difference threshold. .alpha. can be appropriately set depending on the resolution of the image and other conditions to binarize the image stably. PA1 a frame memory for A/D-converting a video signal captured by a TV camera for a test area, that is, a part of the bottom and side of the cylindrical container, and storing the multivalue gray image signal as image data; PA1 a unit for setting at least one position detection slit extending vertically to the arc of the ring-shaped area in the container, the ring-shaped area including a plurality of sampling points on the circumference of the ring-shaped area corresponding to the corner, as a test area on the test screen, between the bottom and the side of the cylindrical container, obtaining a difference gray image signal by scanning the screen data of the frame memory for each position detection slit, and binarizing the difference gray image signal according to a predetermined fixed threshold to obtain an intra-slit position detection image if the binarized value is in the test area; PA1 a unit for obtaining an intra-slit position detection coordinate based on the picture elements crossing the ring-shaped area among the picture elements forming the intra-slit position detection image; PA1 a unit for obtaining the coordinate of the measured position of the center of a circle formed by each of the points represented by an intra-slit position detection coordinate obtained through sampling as described above; and PA1 a unit for storing a container reference position coordinate for the coordinate of the measured position of the cylindrical container located at the container reference position.
If the TV camera 1 is mounted above the cylindrical container 3 to test the cylindrical container 3 by capturing the inner surface of the cylindrical container 3 from above as described above, then the side 3b of the cylindrical container 3 is observed obliquely from the mounted TV camera 1, and the side 3b may not be clearly captured. That is, the resolution of the image is deteriorated, thereby hardly detecting small defects with high precision.
As shown in FIG. 2, the TV camera 1 is mounted to form a predetermined angle .theta. with the central axis of the cylindrical container 3, and captures at its position an area facing the camera as a target test area. In this method, compared with the above described method by referring to FIGS. 1A through 1C, the side 3b of the cylindrical container 3 can be correctly captured, and the capabilities of resolving the picture elements of an image containing the captured portion as a test area can be highly improved, thereby successfully detecting small defects with high precision. However, checking the entire area of the inner surface of the cylindrical container in this method requires mounting a plurality of TV cameras forming different angles at the same testing position.
FIG. 2B shows the test screen generated by capturing the corner of the inner bottom of the cylindrical container from the position of the TV camera shown in FIG. 2A, enlarging the captured image, and adjusting the position of the screen relative to the X and Y axes.
If the inner surface of the cylindrical container 3 is captured obliquely from above by the TV camera 1, a part of the cylindrical container 3 gets out of the vision of the TV camera 1. Therefore, only limited parts of the ring-shaped highlighted portions 101 and 102 can be captured. Furthermore, as shown in FIGS. 2, the arcs of the highlighted portions 101 and 102 cross the lines parallel to the X and Y axes at only one point of each of the lines. Accordingly, the position of the cylindrical container 3 cannot be specified as described above by referring to FIGS. 1A through 1C (that is, specifying the position of the cylindrical container by calculating the coordinate of the middle point using the coordinates of the start and end points of the image signal crossing the scanning lines on the window screen. Thus, the exact position of the cylindrical container 3 cannot be specified.
On the other hand, if the width of the highlighted portion 102 (the corner of the inner bottom of the cylindrical container) is calculated by binarizing the image signal according to the above described equation (1), then an exact value can hardly be obtained. That is, since the scanning direction is fixed while the highlighted portion 102 is ring-shaped, a minimum true width can be obtained if the scanning line crosses the highlighted portion 101 vertically to its width. However, the extended value can be obtained from the true value by having the scanning line cross the highlighted portion 102 obliquely relative to its width. Since .alpha. is a constant, it should be set to a large value, to avoid a case where the width of the highlighted portion 102 contains both target point and a point corresponding to the constant .alpha., thereby generating no difference for binarization and failing in calculation. This also holds true with the highlighted portion 101.
A paper cylindrical container has a seal on its side and a change in gray level on the seal may be binarized as a noise image when the image signal is binarized according to the above described equation (1). Thus, a proper method of checking the position of the cylindrical container without the above described undesirable influences is earnestly demanded.